Technical Q&A QA1407
Printer Queue vs. Printer Name

Q: What is the difference between the name of a printer queue and the printer name that is visible in the print dialog?

A: Since CUPS was introduced into Mac OS X in Jaguar (10.2), there have been two different ways to represent a printer. The external representation, the string Printer Setup Utility and the print dialogs will display, is the printer name. The internal representation, the printer ID, is the string an application should use to track a printer by queue. Users can setup multiple printer queues with the same printer, therefore applications should always internally reference a printer by queue using the printer ID to avoid ambiguity. The main difference being the printer ID is unique where the printer name might not necessarily be.

Setting the current printer for a print session is a good example of when an application will need to internally reference a printer by queue. PMSessionSetCurrentPrinter requires a valid printer ID to successfully complete the process.

There are two routines that provide access to these strings:

PMPrinterGetID  - returns the printer queue

PMPrinterGetName  - returns the user visible printer name

Both return references to a CFString when passed a valid PMPrinter.

Document Revision History

DateNotes
2005-01-25First Version

Posted: 2005-01-25